var current_time;
var entrance_content = '';
var load_time = '';
var min = '';
var loop_num = 5;
var str = '';
var dArr_info = new Array();
var http_type=location.protocol;




for (var i=0;i<dArr.length;i++) {
    dArr_info[i] = new Array(loop_num);
}

function hit(i,j){
    load_time = new Date().getTime();
    dArr_info[i][j] = (load_time - current_time);
    var dArr_total = 0;
    for (var k=0;k<loop_num;k++) {
        if (dArr_info[i][k] != '') {
            dArr_total = dArr_total + dArr_info[i][k];
        }else {
            return;
        }
    }

    document.getElementById('list_'+i).innerHTML = '<font color=#000000>'+(dArr_total / loop_num)+min+'</font>';
    min = '';
}

function list2(event) {
    min = ' <font color=red>鏈€浼� </font>';
    var x=event.x+document.body.scrollLeft;
    var y=event.y+document.documentElement.scrollTop;
    var game = document.getElementById('new_game').innerHTML

    entrance_content = '';
    for (var i=0;i<dArr.length;i++){

        //entrance_content = entrance_content + "<a href='"+http_type+"//"+dArr[i]+"/main_frame.php?"+url+"'><font color=blue>绾胯矾"+i+"</font></a> : ";
        entrance_content = entrance_content + "<a href='"+http_type+"//"+dArr[i]+"/main_frame.jsp?"+game_url+"&game="+game+"'><font color=blue>绾胯矾"+i+"</font></a> : ";



        entrance_content = entrance_content + "<a id='list_"+i+"' src='"+http_type+"//"+dArr[i]+"/speed.php'><font color='grey'>娴嬮€熶腑</font></a><br>";

        for (var j=0;j<loop_num;j++) {
            dArr_info[i][j] = '';
            current_time = new Date().getTime();
            entrance_content = entrance_content + "<img border=0 style='visibility:hidden' height=0 width=0 src='http://"+dArr[i]+"/test2.gif?"+Math.random()+"' onload='hit("+i+","+j+");'>";
        }

    }

    document.getElementById('entrance_content_td').innerHTML = entrance_content;

    document.getElementById("result_tb").style.pixelLeft = x;
    document.getElementById("result_tb").style.pixelTop = y + 15;
    document.getElementById('result_tb').style.display='block';

}
